package org.summer.lawyer.domain.bo.payrefund;

import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.summer.common.mybatis.core.domain.BaseEntitySearch;
import org.summer.lawyer.domain.PayRefund;

import java.io.Serial;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 退款订单业务对象 pay_refund
 *
 * @author summer
 * @date 2024-06-23
 */
@Schema(title ="退款订单视图对象 pay_refund", description = "退款订单视图对象 pay_refund")
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PayRefund.class, reverseConvertGenerate = false)
public class PayRefundBo extends BaseEntitySearch {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Schema(title = "id", type = "Long", description = "主键ID")
    //@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 退款订单ID
     */
    @Schema(title = "refundNo", type = "String", description = "退款订单ID")
    //@NotBlank(message = "退款订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String refundNo;

    /**
     * 支付订单ID
     */
    @Schema(title = "payNo", type = "String", description = "支付订单ID")
    //@NotBlank(message = "支付订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payNo;

    /**
     * 支付应用ID
     */
    @Schema(title = "appId", type = "Long", description = "支付应用ID")
    //@NotNull(message = "支付应用ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long appId;

    /**
     * 微信appid
     */
    @Schema(title = "wxAppId", type = "String", description = "微信appid")
    //@NotBlank(message = "微信appid不能为空", groups = { AddGroup.class, EditGroup.class })
    private String wxAppId;

    /**
     * 商户号
     */
    @Schema(title = "mchNo", type = "String", description = "商户号")
    //@NotBlank(message = "商户号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mchNo;

    /**
     * 商户名称
     */
    @Schema(title = "mchName", type = "String", description = "商户名称")
    //@NotBlank(message = "商户名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mchName;

    /**
     * 通道ID
     */
    @Schema(title = "channelId", type = "Long", description = "通道ID")
    //@NotNull(message = "通道ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long channelId;

    /**
     * 通道编码
     */
    @Schema(title = "channelCode", type = "String", description = "通道编码")
    //@NotBlank(message = "通道编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String channelCode;

    /**
     * 用户ID
     */
    @Schema(title = "userId", type = "Long", description = "用户ID")
    //@NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 用户open_id
     */
    @Schema(title = "openId", type = "String", description = "用户open_id")
    //@NotBlank(message = "用户open_id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String openId;

    /**
     * 第三方交易号
     */
    @Schema(title = "tradeNo", type = "String", description = "第三方交易号")
    //@NotBlank(message = "第三方交易号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tradeNo;

    /**
     * 订单ID
     */
    @Schema(title = "orderId", type = "Long", description = "订单ID")
    //@NotNull(message = "订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 付款方式
     */
    @Schema(title = "payWay", type = "String", description = "付款方式")
    //@NotNull(message = "付款方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payWay;

    /**
     * 支付状态（退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-退款任务关闭）
     */
    @Schema(title = "refundStatus", type = "Integer", description = "支付状态（退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-退款任务关闭）")
    //@NotNull(message = "支付状态（退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-退款任务关闭）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer refundStatus;

    /**
     * 支付时间
     */
    @Schema(title = "payTime", type = "Date", description = "支付时间")
    //@NotNull(message = "支付时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date payTime;

    /**
     * 步骤(1 创建支付，2 支付回调通知)
     */
    @Schema(title = "payStep", type = "Integer", description = "步骤(1 创建支付，2 支付回调通知)")
    //@NotNull(message = "步骤(1 创建支付，2 支付回调通知)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer payStep;

    /**
     * 请求支付状态（请求支付状态，1成功，2失败）
     */
    @Schema(title = "postStatus", type = "Integer", description = "请求支付状态（请求支付状态，1成功，2失败）")
    //@NotNull(message = "请求支付状态（请求支付状态，1成功，2失败）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer postStatus;

    /**
     * 回调状态（1成功，2失败）
     */
    @Schema(title = "returnStatus", type = "Integer", description = "回调状态（1成功，2失败）")
    //@NotNull(message = "回调状态（1成功，2失败）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer returnStatus;

    /**
     * 支付金额（单位分）
     */
    @Schema(title = "amount", type = "Long", description = "支付金额（单位分）")
    //@NotNull(message = "支付金额（单位分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long amount;

    /**
     * 退款金额
     */
    @Schema(title = "refundPrice", type = "Long", description = "退款金额")
    //@NotNull(message = "退款金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long refundPrice;

    /**
     * 第三方返回的错误码
     */
    @Schema(title = "resultCode", type = "String", description = "第三方返回的错误码")
    //@NotBlank(message = "第三方返回的错误码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String resultCode;

    /**
     * 第三方返回的错误信息
     */
    @Schema(title = "resultMsg", type = "String", description = "第三方返回的错误信息")
    //@NotBlank(message = "第三方返回的错误信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String resultMsg;

    /**
     * 提交的信息
     */
    @Schema(title = "postJson", type = "String", description = "提交的信息")
    //@NotBlank(message = "提交的信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String postJson;

    /**
     * 回调的信息
     */
    @Schema(title = "returnJson", type = "String", description = "回调的信息")
    //@NotBlank(message = "回调的信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String returnJson;

    /**
     * 回调时间
     */
    @Schema(title = "returnTime", type = "Date", description = "回调时间")
    //@NotNull(message = "回调时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date returnTime;

    /**
     * 回调地址
     */
    @Schema(title = "notifyUrl", type = "String", description = "回调地址")
    //@NotBlank(message = "回调地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String notifyUrl;

    /**
     * 手续费比率（千位比，1/1000）
     */
    @Schema(title = "procedureKb", type = "Integer", description = "手续费比率（千位比，1/1000）")
    //@NotNull(message = "手续费比率（千位比，1/1000）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer procedureKb;

    /**
     * 手续费（单位分）
     */
    @Schema(title = "procedureFee", type = "Long", description = "手续费（单位分）")
    //@NotNull(message = "手续费（单位分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long procedureFee;

    /**
     * 扩展参数
     */
    @Schema(title = "extParam", type = "String", description = "扩展参数")
    //@NotBlank(message = "扩展参数不能为空", groups = { AddGroup.class, EditGroup.class })
    private String extParam;

    /**
     * 退款原因
     */
    @Schema(title = "refundReason", type = "String", description = "退款原因")
    //@NotBlank(message = "退款原因不能为空", groups = { AddGroup.class, EditGroup.class })
    private String refundReason;

    /**
     * 订单退款成功时间
     */
    @Schema(title = "successTime", type = "Date", description = "订单退款成功时间")
    //@NotNull(message = "订单退款成功时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDateTime successTime;


}
